\(\int \frac {a+b x+c x^2}{(f+g x)^{3/2}} \, dx\) [829]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 71 \[ \int \frac {a+b x+c x^2}{(f+g x)^{3/2}} \, dx=-\frac {2 \left (c f^2-b f g+a g^2\right )}{g^3 \sqrt {f+g x}}-\frac {2 (2 c f-b g) \sqrt {f+g x}}{g^3}+\frac {2 c (f+g x)^{3/2}}{3 g^3} \]

[Out]

2/3*c*(g*x+f)^(3/2)/g^3-2*(a*g^2-b*f*g+c*f^2)/g^3/(g*x+f)^(1/2)-2*(-b*g+2*c*f)*(g*x+f)^(1/2)/g^3

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {712} \[ \int \frac {a+b x+c x^2}{(f+g x)^{3/2}} \, dx=-\frac {2 \left (a g^2-b f g+c f^2\right )}{g^3 \sqrt {f+g x}}-\frac {2 \sqrt {f+g x} (2 c f-b g)}{g^3}+\frac {2 c (f+g x)^{3/2}}{3 g^3} \]

[In]

Int[(a + b*x + c*x^2)/(f + g*x)^(3/2),x]

[Out]

(-2*(c*f^2 - b*f*g + a*g^2))/(g^3*Sqrt[f + g*x]) - (2*(2*c*f - b*g)*Sqrt[f + g*x])/g^3 + (2*c*(f + g*x)^(3/2))
/(3*g^3)

Rule 712

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*
e + a*e^2, 0] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {c f^2-b f g+a g^2}{g^2 (f+g x)^{3/2}}+\frac {-2 c f+b g}{g^2 \sqrt {f+g x}}+\frac {c \sqrt {f+g x}}{g^2}\right ) \, dx \\ & = -\frac {2 \left (c f^2-b f g+a g^2\right )}{g^3 \sqrt {f+g x}}-\frac {2 (2 c f-b g) \sqrt {f+g x}}{g^3}+\frac {2 c (f+g x)^{3/2}}{3 g^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.76 \[ \int \frac {a+b x+c x^2}{(f+g x)^{3/2}} \, dx=\frac {6 g (2 b f-a g+b g x)+2 c \left (-8 f^2-4 f g x+g^2 x^2\right )}{3 g^3 \sqrt {f+g x}} \]

[In]

Integrate[(a + b*x + c*x^2)/(f + g*x)^(3/2),x]

[Out]

(6*g*(2*b*f - a*g + b*g*x) + 2*c*(-8*f^2 - 4*f*g*x + g^2*x^2))/(3*g^3*Sqrt[f + g*x])

Maple [A] (verified)

Time = 0.48 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.66

method result size
pseudoelliptic \(\frac {\frac {2 \left (c \,x^{2}+3 b x -3 a \right ) g^{2}}{3}+4 f \left (-\frac {2 c x}{3}+b \right ) g -\frac {16 c \,f^{2}}{3}}{\sqrt {g x +f}\, g^{3}}\) \(47\)
gosper \(-\frac {2 \left (-c \,x^{2} g^{2}-3 b \,g^{2} x +4 c f x g +3 a \,g^{2}-6 b f g +8 c \,f^{2}\right )}{3 \sqrt {g x +f}\, g^{3}}\) \(53\)
trager \(-\frac {2 \left (-c \,x^{2} g^{2}-3 b \,g^{2} x +4 c f x g +3 a \,g^{2}-6 b f g +8 c \,f^{2}\right )}{3 \sqrt {g x +f}\, g^{3}}\) \(53\)
risch \(\frac {2 \left (c x g +3 b g -5 c f \right ) \sqrt {g x +f}}{3 g^{3}}-\frac {2 \left (a \,g^{2}-b f g +c \,f^{2}\right )}{g^{3} \sqrt {g x +f}}\) \(55\)
derivativedivides \(\frac {\frac {2 \left (g x +f \right )^{\frac {3}{2}} c}{3}+2 b g \sqrt {g x +f}-4 c f \sqrt {g x +f}-\frac {2 \left (a \,g^{2}-b f g +c \,f^{2}\right )}{\sqrt {g x +f}}}{g^{3}}\) \(63\)
default \(\frac {\frac {2 \left (g x +f \right )^{\frac {3}{2}} c}{3}+2 b g \sqrt {g x +f}-4 c f \sqrt {g x +f}-\frac {2 \left (a \,g^{2}-b f g +c \,f^{2}\right )}{\sqrt {g x +f}}}{g^{3}}\) \(63\)

[In]

int((c*x^2+b*x+a)/(g*x+f)^(3/2),x,method=_RETURNVERBOSE)

[Out]

2/3*((c*x^2+3*b*x-3*a)*g^2+6*f*(-2/3*c*x+b)*g-8*c*f^2)/(g*x+f)^(1/2)/g^3

Fricas [A] (verification not implemented)

none

Time = 0.39 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.89 \[ \int \frac {a+b x+c x^2}{(f+g x)^{3/2}} \, dx=\frac {2 \, {\left (c g^{2} x^{2} - 8 \, c f^{2} + 6 \, b f g - 3 \, a g^{2} - {\left (4 \, c f g - 3 \, b g^{2}\right )} x\right )} \sqrt {g x + f}}{3 \, {\left (g^{4} x + f g^{3}\right )}} \]

[In]

integrate((c*x^2+b*x+a)/(g*x+f)^(3/2),x, algorithm="fricas")

[Out]

2/3*(c*g^2*x^2 - 8*c*f^2 + 6*b*f*g - 3*a*g^2 - (4*c*f*g - 3*b*g^2)*x)*sqrt(g*x + f)/(g^4*x + f*g^3)

Sympy [A] (verification not implemented)

Time = 1.05 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.32 \[ \int \frac {a+b x+c x^2}{(f+g x)^{3/2}} \, dx=\begin {cases} \frac {2 \left (\frac {c \left (f + g x\right )^{\frac {3}{2}}}{3 g^{2}} + \frac {\sqrt {f + g x} \left (b g - 2 c f\right )}{g^{2}} - \frac {a g^{2} - b f g + c f^{2}}{g^{2} \sqrt {f + g x}}\right )}{g} & \text {for}\: g \neq 0 \\\frac {a x + \frac {b x^{2}}{2} + \frac {c x^{3}}{3}}{f^{\frac {3}{2}}} & \text {otherwise} \end {cases} \]

[In]

integrate((c*x**2+b*x+a)/(g*x+f)**(3/2),x)

[Out]

Piecewise((2*(c*(f + g*x)**(3/2)/(3*g**2) + sqrt(f + g*x)*(b*g - 2*c*f)/g**2 - (a*g**2 - b*f*g + c*f**2)/(g**2
*sqrt(f + g*x)))/g, Ne(g, 0)), ((a*x + b*x**2/2 + c*x**3/3)/f**(3/2), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.93 \[ \int \frac {a+b x+c x^2}{(f+g x)^{3/2}} \, dx=\frac {2 \, {\left (\frac {{\left (g x + f\right )}^{\frac {3}{2}} c - 3 \, {\left (2 \, c f - b g\right )} \sqrt {g x + f}}{g^{2}} - \frac {3 \, {\left (c f^{2} - b f g + a g^{2}\right )}}{\sqrt {g x + f} g^{2}}\right )}}{3 \, g} \]

[In]

integrate((c*x^2+b*x+a)/(g*x+f)^(3/2),x, algorithm="maxima")

[Out]

2/3*(((g*x + f)^(3/2)*c - 3*(2*c*f - b*g)*sqrt(g*x + f))/g^2 - 3*(c*f^2 - b*f*g + a*g^2)/(sqrt(g*x + f)*g^2))/
g

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.04 \[ \int \frac {a+b x+c x^2}{(f+g x)^{3/2}} \, dx=-\frac {2 \, {\left (c f^{2} - b f g + a g^{2}\right )}}{\sqrt {g x + f} g^{3}} + \frac {2 \, {\left ({\left (g x + f\right )}^{\frac {3}{2}} c g^{6} - 6 \, \sqrt {g x + f} c f g^{6} + 3 \, \sqrt {g x + f} b g^{7}\right )}}{3 \, g^{9}} \]

[In]

integrate((c*x^2+b*x+a)/(g*x+f)^(3/2),x, algorithm="giac")

[Out]

-2*(c*f^2 - b*f*g + a*g^2)/(sqrt(g*x + f)*g^3) + 2/3*((g*x + f)^(3/2)*c*g^6 - 6*sqrt(g*x + f)*c*f*g^6 + 3*sqrt
(g*x + f)*b*g^7)/g^9

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.82 \[ \int \frac {a+b x+c x^2}{(f+g x)^{3/2}} \, dx=\frac {2\,c\,{\left (f+g\,x\right )}^2-6\,a\,g^2-6\,c\,f^2+6\,b\,g\,\left (f+g\,x\right )-12\,c\,f\,\left (f+g\,x\right )+6\,b\,f\,g}{3\,g^3\,\sqrt {f+g\,x}} \]

[In]

int((a + b*x + c*x^2)/(f + g*x)^(3/2),x)

[Out]

(2*c*(f + g*x)^2 - 6*a*g^2 - 6*c*f^2 + 6*b*g*(f + g*x) - 12*c*f*(f + g*x) + 6*b*f*g)/(3*g^3*(f + g*x)^(1/2))